<template>
  <div>
    <!-- 用户列表卡片区 -->
    <el-card shadow="hover">
      <el-form :inline="true" :model="formInline">
        <el-form-item label="品牌" label-width="70px">
          <el-select clearable v-model="formInline.user" placeholder="请选择" size="small">
            <el-option v-for="item in cities" :key="item.value" :label="item.label" :value="item.value">
              <span style="float: left">{{ item.label }}</span>
              <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="型号" label-width="70px">
          <el-select clearable v-model="formInline.region" placeholder="手机型号" size="small">
            <el-option label="xs" value="shanghai"></el-option>
            <el-option label="xs max" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="邮箱" style="margin-top: 4px;" label-width="70px" size="small">
          <el-input clearable v-model="formInline.name"></el-input>
        </el-form-item>
        <el-form-item label="在售" label-width="70px">
          <el-radio v-model="radio" label="1">是</el-radio>
          <el-radio v-model="radio" label="2">否</el-radio>
        </el-form-item>
        <el-form-item label="名称" style="margin-top: 4px;" label-width="70px" size="small">
          <el-input clearable v-model="formInline.name"></el-input>
        </el-form-item>
        <el-form-item style="margin-left:30px;">
          <el-button @click="" icon="el-icon-refresh" size="small">重置</el-button>
          <el-button type="primary" @click="" icon="el-icon-search" size="small">查询</el-button>
          <el-button type="success" icon="el-icon-plus" @click="" size="small">添加</el-button>
          <el-button @click="downExcel" icon="el-icon-download" size="small">导出</el-button>
        </el-form-item>
      </el-form>
      <!--表格-->
      <el-table :data="tableData" border style="width: 100%;">
        <el-table-column prop="date" label="日期" width="180"></el-table-column>
        <el-table-column prop="name" label="姓名" width="180"></el-table-column>
        <el-table-column prop="address" label="地址"></el-table-column>
      </el-table>
      <el-pagination style="margin-top:10px;" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage4" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="500"></el-pagination>
    </el-card>
  </div>
</template>

<script>
  export default {
    name: 'MobileSetting',
    data() {
      return {
        radio: '1',
        formInline: {
          user: '',
          region: '',
          name: ''
        },
        cities: [{
          value: 'Beijing',
          label: '北京'
        }, {
          value: 'Shanghai',
          label: '上海'
        }, {
          value: 'Nanjing',
          label: '南京'
        }, {
          value: 'Chengdu',
          label: '成都'
        }, {
          value: 'Shenzhen',
          label: '深圳'
        }, {
          value: 'Guangzhou',
          label: '广州'
        }],
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }],
        currentPage4: 4
      };
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      },
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      },
      downExcel(){

      }
    }
  };
</script>

<style scoped>
.box-card{
  height: auto;
}
</style>
